<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>业主爱家</title>
<link type="text/css" rel="stylesheet" href="css/houseMain.css">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/style.css" media="screen" type="text/css" />
<script src="js/jquery-1.12.4.js"></script>
<script  type="text/javascript">
  $(function(){
        $("#mysele").click(function () {
            $("#mydiv").toggle();
        });
        $("#sub").click(function  () {
        	var flag=false;
        	for(var i=0;i<$(".bbt").length;i++){
        	    if($(".bbt")[i].checked==true){
        	    	  flag=true;
          	      
        	      }
        	 }
        	if(flag==false){
        		 alert("请选中你要发送的小区！");
        	}
        	return flag;
        });
  })
     function setSelect() {
            var  hobbies=document.getElementsByName("hobby");
            for(var i=0;i<hobbies.length;i++){
                hobbies[i].checked=arguments[0];
            }
        }
     
    </script>
    
</head>
<body style="withd:100%;">
<!--右边内容栏-->
	<div id="content">
		<div id="conTitle">&nbsp;| 编写通知</div>
		<div id="notice">
			<b>请填写要发送的信息:——————————————</b>
			<form id="oform" action="releaseNotice" method="post"  >
			<div id="noticeDetail">
				<div id="roomNum" >
					
						小区编号:<select id="mysele" style="width:200px;" ><option checked="checked" style="display:none;" >select</option></select>&nbsp;&nbsp;&nbsp; 通知类型:<input name="notice" type="radio"
							checked="checked" />通知公告
						<div id="mydiv" style="width:200px;height:100px;overflow-y: scroll;border:1px solid #cdcdcd;position: relative;left:68px;display:none;">
						<button type="button"  onclick="setSelect(true);">全选</button>
						<button type="button" onclick="setSelect(false);">取消</button><br/>
							<c:forEach items="${list}" var="list">
							<input  type="checkbox" class="bbt" name="hobby" value="${list.disId.id}"><label>${list.disId.districtName}</label><br/>
							</c:forEach>
							</div>
					
				</div>
				<div id="message">
					文本:
					<textarea name="comment">

                    </textarea>
				</div>
				<br/><br/>
				<hr/>
				<br/>
				<div>
					<button type="submit" id="sub">确定</button>
					<button type="button" onclick="window.history.go(-1)">取消</button>
				</div>
				
			</div>
			</form>
		</div>
	</div>
</body>
</html>